package com.example.robertluozizhao.java.design.prototype;

/**
 * Created by Lzz on 8/29/2019.
 */

public class ProtoTypeBean implements Cloneable {

    private String name;
    private int index;

    @Override
    protected Object clone() throws CloneNotSupportedException {
        return super.clone();
    }

    public ProtoTypeBean() {
        System.out.println("执行构造方法.................");
    }

    public ProtoTypeBean(String name, int index) {
        System.out.println("执行构造方法.................");
        this.name = name;
        this.index = index;
    }

    @Override
    public String toString() {
        return "ProtoTypeBean{" +
                "name='" + name + '\'' +
                ", index=" + index +
                '}';
    }
}
